/* eslint-disable consistent-this */
/* eslint-disable react/no-string-refs */
/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 * @flow strict-local
 */
import React, {Component} from 'react';
import {StatusBar,Platform} from 'react-native';
import {Provider} from 'react-redux';
import Navigator from './navigator/Stack';
import store from './store';
import global from './utils/Global'



//所有子页面均可直接调用global.Toast来吐司提示消息

export default class App extends Component {
  constructor(props) {
    super(props);
  }

  componentDidMount() {
    StatusBar.setBarStyle('dark-content',true);
    // 背景颜色是透明
    Platform.OS === 'android' ? StatusBar.setBackgroundColor('transparent',true):'';
    // 设置状态栏透明
    Platform.OS === 'android' ? StatusBar.setTranslucent(true) : '';

  }

  render() {
    return (
      <Provider store={store}>
        <Navigator />
      </Provider>
    );
  }
}
